package com.xzjt.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.xzjt.common.annotation.Excel;
import com.xzjt.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 组织机构对象 sys_org
 *
 * @author xzjt
 * @date 2021-09-01
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysOrg extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 组织机构id */
    private Long orgId;
    /** 父机构id */
    @Excel(name = "父机构id")
    private Long parentId;
    /** 祖级列表 */
    @Excel(name = "祖级列表")
    private String ancestors;
    /** 机构名称 */
    @Excel(name = "机构名称")
    private String orgName;
    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 子机构 */
    @TableField(exist = false)
    private List<SysOrg> children = new ArrayList<SysOrg>();

}
